using System;
// ReSharper disable CheckNamespace

[AttributeUsage(AttributeTargets.Field)]
public class ConfigAttribute : Attribute
{
    public string ConfigName { get; set; } = string.Empty;
    public string Description { get; set; } = string.Empty;
    public float MinValue { get; set; } = 0f;
    public float MaxValue { get; set; } = 0f;
    public int InputMaxLength { get; set; } = 0;
    public int FloatDecimalPlaces { get; set; } = 1;
    public bool AutoSave { get; set; } = true;
}

[AttributeUsage(AttributeTargets.Field)]
public class EnumDisplayAttribute : Attribute
{
    public string DisplayName { get; }

    public EnumDisplayAttribute(string displayName)
    {
        DisplayName = displayName;
    }
}

[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class OnChangeAttribute : Attribute
{
    public string? ConfigName { get; }

    public OnChangeAttribute()
    {
        ConfigName = null;
    }

    public OnChangeAttribute(string configName)
    {
        ConfigName = configName;
    }
}

[AttributeUsage(AttributeTargets.Method)]
public class ButtonAttribute : Attribute
{
    public string Description { get; set; }
    public string ButtonText { get; set; }
    public string? ButtonKey { get; set; }

    public ButtonAttribute(string description, string buttonText = "按钮", string? buttonKey = null)
    {
        ButtonKey = buttonKey;
        Description = description;
        ButtonText = buttonText;
    }
}